package domd3;

import java.util.Scanner;
public class Main {
    public static void main(String[] args) {
        Scanner input=new Scanner(System.in);
        int n= input.nextInt();//第n小的质数
        int count=0;//记遍历过的质数的个数
        int limit=10000;
        boolean Bol[]=new boolean[limit+1];
        int i=2;
        for ( i = 1; i <=limit ; i++) {
            Bol[i]=true;//标记所有为素数
        }
        // 埃拉托斯特尼筛法
        for (int factor = 2; factor * factor <= limit; factor++) {
            if (Bol[factor]) { // 如果当前数是质数
                for (int j = factor * factor; j <= limit; j += factor) {//j += factor：每次循环增加factor，即跳过所有factor的倍数
                    Bol[j] = false; // 将所有倍数标记为非质数
                }
            }
        }
        for ( i = 2; i <=limit ; i++) {
            if(Bol[i]){
                System.out.print(" "+i);
            }

        }
        input.close();
    }
}